package com.ruoyi.kong.service.impl;

import com.ruoyi.kong.entity.KongCaCertificate;
import com.ruoyi.kong.entity.KongEntity;
import com.ruoyi.kong.fegin.KongClientService;
import com.ruoyi.kong.service.IKongCaCertificateService;
import com.ruoyi.kong.utils.KongActiveProfileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class KongCaCertificateServiceImpl implements IKongCaCertificateService {

    @Autowired
    private KongActiveProfileUtil kongActiveProfileUtil;

    @Override
    public KongEntity<KongCaCertificate> caCertificates() {
        return KongClientService.getInstance(kongActiveProfileUtil.getKongServerUrl()).caCertificates();
    }
}
